<template>
  <div>
    <van-nav-bar
  :title="name"
  left-text="返回"
  :right-text="to"
  left-arrow
  @click-left="onClickLeft"
  @click-right="onClickRight"
  
/>
  </div>
</template>
<script>
export default{
  props:{name:String,to:String,route:String},
  methods: {
    onClickLeft() {
      this.$router.go(-1)
    },
    onClickRight() {
      this.$router.push(this.route)
    },
  },
}
</script>